/**
 * @description: 返回el的宽高
 * @param {Element} el
 * @return {*}
 */
export function getElementSize(el) {
  const computedStyle = window.getComputedStyle(unref(el))

  const paddingBorder = (
    Number.parseFloat(computedStyle.padding) * 2) + (Number.parseFloat(computedStyle.borderWidth) * 2
  )

  const width = unref(el).clientWidth - paddingBorder
  const height = unref(el).clientHeight - paddingBorder

  return { width, height }
}
